cmake_minimum_required(VERSION 3.8)
project(jsonconfig)

message(STATUS "cmake default debug CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_DEBUG}")
message(STATUS "cmake default release CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS_RELEASE}")

SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG")
#SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

find_package(Qt5 COMPONENTS Core REQUIRED)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

set(SOURCES jsonconfig.h jsondata.h serverdata.h)
if(NOT MSVC)
    add_definitions(-std=c++11)
endif()
message(STATUS "C++ flags have ${CMAKE_CXX_FLAGS}")

link_libraries(Qt5::Core)

add_executable(jsonconfig ${SOURCES} main.cpp)

